import unittest
from Pages.BasePage import webdriver
from utils.Common import driver_path as cc
from cases import TestCaseInfo
from utils import log as LogUtility
from Pages.LoginPage import LoginPage

class Test_TC_Login(unittest.TestCase):
	def setup(self):
		self.driver = webdriver.Chrome(cc.driver_path())
		self.base_url = cc.base_url()
#		self.testCaseInfo = TestCaseInfo(id='username',name='password',owner='Edwin ma')
#		self.testResult = TestReport()
		LogUtility.CreateLoggerFile("Test_TC_Login")


	def test_A(self):
		self.assertEqual(1, 1+1)
		try:
			self.testCaseInfo.starttime = cc.getCurrentTime()
			LogUtility.Log("Open Base site " + self.base_url)
			self.driver.get(self.base_url)
			LoginPage.set_username('admin')
			LoginPage.set_password('123456')
			LoginPage.click_SignIn('submit')
			LogUtility.Log("Logging web ...")
			self.testCaseInfo.endtime = cc.getCurrentTime()
		except:
			pass
	def test_B(self):
		self.assertEqual(1, 2-1)
		LogUtility.Log("Test voer!")









